/**
 * Created by coder on 2018/5/14.
 */
import {store} from '../store'
import {ACTION_AUTH} from '../store/action'
import {lskey, rememberKey} from "../config/config";

export default {
	getToken(){
		return localStorage.getItem(lskey);
	},

	setToken(token){
		localStorage.removeItem(lskey);
		return localStorage.setItem(lskey, token);
	},

	removeToken(){
		localStorage.removeItem(lskey);
	},

	rememberLogin(info){
		localStorage.removeItem(rememberKey);
		localStorage.setItem(rememberKey,info);
	},

	checkRememberLogin(){
		return localStorage.getItem(rememberKey);
	},

	removeRememberLogin(){
		localStorage.removeItem(rememberKey);
	}
};